{# A meeting's notes (my action items first, then everyone's, the decisions and open questions, each jumping to the line it came from), its threads (Overseer's drawer), its transcript and who talked, a tab each so a long call is read a part at a time: the Meetings page's body and Overseer's drawer, each setting ``base``, where its own routes for the meeting are. The notes open first, the transcript at a search hit or when there are no notes. #} {% from "components/macros/form.html" import action, select %} {% from "components/macros/layout.html" import card, ranked_rows, tab_panel, tabbed %} {% from "pages/meetings/_macros.html" import heading, items, notes_view, transcript %} {% set hx_body = 'hx-target="#meeting-body" hx-swap="outerHTML"' %} {% set has_notes = notes or notes_error or can_write %} {% set has_threads = with_threads is defined and notes and not (under_way or writing) %} {% set tabs = [] %} {% if has_notes %}{% set _ = tabs.append(("notes", "Notes")) %}{% endif %} {% if has_threads %}{% set _ = tabs.append(("threads", "Threads")) %}{% endif %} {% set _ = tabs.append(("transcript", "Transcript")) %} {% if talk %}{% set _ = tabs.append(("talk", "Who talked")) %}{% endif %} {% set open = "transcript" if hit_line or not has_notes else "notes" %} {% call tabbed("meeting", tabs, open) %} {% if has_notes %} {% call tab_panel("notes", open) %} {% call card(None, id="meeting-notes") %} {% if under_way %}

The notes are written once the bot has left.

{% elif writing %}

Writing the notes…

{% else %} {% call notes_view(notes, notes_error, clock, "No notes yet." if turns else "Nothing was said, so there is nothing to note.", voices) %}
{{ heading("Yours") }} {# Only my items are redrawn: the page or drawer stays where it is. #}
{{ select("name", people, selected=me, blank="Nobody here", label="I am") }}
{{ items(mine, "Nothing for you." if me else "Say which speaker you are to see yours.", clock) }}
{% endcall %} {% endif %} {% if can_rewrite %}
{{ action("Write them again" if notes or notes_error else "Write the notes", 'data-write hx-post="' ~ base ~ '/notes" ' ~ hx_body) }}
{% endif %} {% endcall %} {% endcall %} {% endif %} {# Overseer's drawer loads the meeting's threads here (with_threads). #} {% if has_threads %} {% call tab_panel("threads", open) %}
{% endcall %} {% endif %} {% call tab_panel("transcript", open) %} {% call card(None, id="meeting-transcript") %} {% if turns %} {# Kept in view while reading: back to the notes, to the start, to the latest line (app.js's ``data-scroll-to``). #}
{% if has_notes %}{{ action("Notes", 'data-scroll-to="#meeting-notes"') }}{% endif %} {{ action("Start of the transcript", 'data-scroll-to="#meeting-transcript [data-turn]:first-child"', glyph="arrow-up") }} {{ action("Latest line", 'data-scroll-to="#meeting-transcript [data-turn]:last-child"', glyph="arrow-down") }}
{% endif %} {{ transcript(turns, clock, voices, hit_line) }} {% endcall %} {% endcall %} {% if talk %} {% call tab_panel("talk", open) %} {% call card(None, id="meeting-heard") %}{{ ranked_rows(talk) }}{% endcall %} {% endcall %} {% endif %} {% endcall %}